package com.rainsoftware.LicenseSystem.models.entity;

import com.rainsoftware.LicenseSystem.models.entity.base.BaseEntity;
import gaarason.database.annotation.Column;
import gaarason.database.annotation.Table;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Repository;


@Data
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Table(name = "licensekeys")
public class Licensekeys extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** auto generator start **/


    @Column(name = "license_key", length = 512L)
    private String licenseKey;

    @Column(name = "developer_id", nullable = true)
    private Integer developerId;

    @Column(name = "product_id", nullable = true)
    private Integer productId;

    @Column(name = "machine", length = 256L)
    private String machine;

    @Column(name = "activated")
    private Integer activated;

    @Column(name = "created_at")
    private LocalDateTime createdAt;

    @Column(name = "activated_at", nullable = true)
    private LocalDateTime activatedAt;

    @Column(name = "duration")
    private Long duration;


    /** auto generator end **/

    @Repository
    public static class Model extends BaseEntity.BaseModel<Licensekeys, Integer> {

    }

}